def mailReminder = 
'''
Dear ${salutation? salutation+' ': ' '}$lastname,
another month has passed and it's time for these
<%=tasks.size()%> tasks:
<%
tasks.each {
	out.println "- $it"
}
%>
'''

def engine = new groovy.text.SimpleTemplateEngine()
def template = engine.createTemplate(mailReminder)
def binding = [
	salutation: 'Mrs.',
	lastname: 'davis',
	tasks: [
		'Visit the groovy in actin page',
		'chat with gina readers'
	]
]

println template.make(binding).toString()
